/**
 * Hupu LRS APP
 */

// load app's config
var config = require('./config');

// 处理参数
var inst = process.argv[2] == undefined ? 'dev' : process.argv[2];
if(!config[inst]){
    console.log('wrong inst')
}
config = config[inst]

// load modules
var redis = require('redis'),
    sio = require('socket.io').listen(config.socket.port);

// load servers
var socket_server = require('./socket_server');

// setup socket_server
socket_server(sio, config, redis);

